//
//
// @author Michael Liljenstam, ISTS, Dartmouth College
//
// $Id: CodeRedGammaFunction.java,v 1.1 2003/03/03 03:06:13 mili Exp $

package SSF.App.Worm;

import java.util.*;


/**
 *  Models removal observed during Code Red v2.
 *  Approxmated by a constant recovery rate starting 7 hrs into the 
 *  infestation. The global constant recoveries are distributed over 
 *  strata according to fraction of infections.
 */
public class CodeRedGammaFunction extends GammaFunction {

    /** 
     *  Calculate gamma function.
     *  @param t Current simulation time.
     *  @param i Number of local infected.
     *  @param iTot Total number of infected.
     */
    public float gamma(float t, float i, float iTot) {
	if (t > (7 * 3600))  // starts after 7 hrs
	    // system-wide: 18750 removals per hour
	    // distributed in proportion to infections
	    return (18750F / 3600) * i / iTot; 
	else
	    return 0F;
    } // gamma()
}
